import React, {Component, PropTypes} from "react";
import {Provider} from 'mobx-react';
import MyFavourite from "./index";

import FavouriteBrowserStore from "../stores/FavouriteBrowserStore";
import FavouriteDialogStore from "../stores/FavouriteDialogStore";
import FavouriteDirStore from "../stores/FavouriteDirStore";
import MyFavouriteStore from "../stores/MyFavouriteStore";
import SysFavFormStore from "../stores/SysFavFormStore";
import SysFavouriteStore from "../stores/SysFavouriteStore";

const favouriteDialogStore = new FavouriteDialogStore();
const favouriteBrowserStore = new FavouriteBrowserStore();
const sysFavouriteStore = new SysFavouriteStore(favouriteBrowserStore, favouriteDialogStore);
const favouriteDirStore = new FavouriteDirStore(sysFavouriteStore);
const myFavouriteStore = new MyFavouriteStore(sysFavouriteStore);
const sysFavFormStore = new SysFavFormStore(sysFavouriteStore, favouriteDialogStore);

const stores = {
    favouriteDialogStore,
    favouriteBrowserStore,
    sysFavouriteStore,
    favouriteDirStore,
    myFavouriteStore,
    sysFavFormStore
}

export default class Favourite4Theme extends Component {
    render() {
        return (
            <Provider ecId={`${this && this.props && this.props.ecId || ''}_Provider@m08bl6`} {...stores}>
                <MyFavourite ecId={`${this && this.props && this.props.ecId || ''}_MyFavourite@zgzqj4`} {...this.props}/>
            </Provider>
        )
    }
}